package cqie.edu.bootexperiment3;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import cqie.edu.bootexperiment3.domain.TCustomer;
import cqie.edu.bootexperiment3.mapper.TCustomerMapper;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class test_update {
    @Autowired
    TCustomerMapper customerMapper;

    @Test
    public void test_updateJobByUsername() {
        UpdateWrapper<TCustomer> wrapper = new UpdateWrapper<TCustomer>()
                .eq("username", "王五")
                .set("job", "总经理");
        customerMapper.update(wrapper);
    }
}
